// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 修改岗位 PUT /api/system/post */
export async function postEditUsingPUT(body: API.SysPost, options?: { [key: string]: any }) {
  return request<Record<string, any>>('/api/system/post', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 新增岗位 POST /api/system/post */
export async function postAddUsingPOST(body: API.SysPost, options?: { [key: string]: any }) {
  return request<Record<string, any>>('/api/system/post', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除岗位 DELETE /api/system/post/${param0} */
export async function postRemoveUsingDELETE(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.postRemoveUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { postIds: param0, ...queryParams } = params;
  return request<Record<string, any>>(`/api/system/post/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 根据岗位编号获取详细信息 GET /api/system/post/${param0} */
export async function postGetInfoUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.postGetInfoUsingGETParams,
  options?: { [key: string]: any },
) {
  const { postId: param0, ...queryParams } = params;
  return request<Record<string, any>>(`/api/system/post/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 导出岗位列表 POST /api/system/post/export */
export async function postExportUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.postExportUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<any>('/api/system/post/export', {
    method: 'POST',
    params: {
      ...params,
      params: undefined,
      ...params['params'],
    },
    ...(options || {}),
  });
}

/** 获取岗位列表 GET /api/system/post/list */
export async function postListUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.postListUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.TableDataInfo>('/api/system/post/list', {
    method: 'GET',
    params: {
      ...params,
      params: undefined,
      ...params['params'],
    },
    ...(options || {}),
  });
}

/** 获取岗位选择框列表 GET /api/system/post/optionSelect */
export async function postOptionSelectUsingGET(options?: { [key: string]: any }) {
  return request<Record<string, any>>('/api/system/post/optionSelect', {
    method: 'GET',
    ...(options || {}),
  });
}
